package cn.echoedu.specifics;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import cn.echoedu.daoconstants.TableName;

public abstract class BaseSpec {
	public  abstract <T> PreparedStatement getPreparedInsert(Connection con,
			TableName tableName,T currentPojo)throws SQLException;
	public abstract <T> PreparedStatement getPreparedInsertRunning(Connection con,
			TableName tableName,T currentPojo)throws SQLException;
	public  abstract <T> PreparedStatement getPreparedListInsert(Connection con,
			TableName tableName,T currentPojo)throws SQLException;
	public abstract <T> PreparedStatement getPreparedListInsertRunning(Connection con,
			TableName tableName,T currentPojo)throws SQLException;
	
	public abstract Object getPojo(ResultSet rs)throws SQLException;
	public abstract <T> PreparedStatement getPreparedUpdate(Connection con,TableName tableName,
			T oldPojo,T currentPojo)throws SQLException;
	public abstract <T> String getPreparedInsertGetPrimaryKeySql(Connection con, 
			TableName tableName,T currentPojo)throws SQLException;
	public abstract Object getLeftJoinPojo(ResultSet rs) throws SQLException;
	public abstract Object getPojoBySql(ResultSet rs) throws SQLException;
    
}
